package com.frost.trans.service;

import com.frost.trans.mapper.LogInfoMapper;
import com.frost.trans.model.LogInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class LogInfoService {
    @Autowired
    private LogInfoMapper logInfoMapper;

    @Transactional(propagation = Propagation.NESTED)
    public Integer insertLog(LogInfo logInfo) {
        Integer res = logInfoMapper.insertLog(logInfo);
        try {
            int a = 10 / 0;
        }catch (Exception e) {
            e.printStackTrace();
        }
        return res;
    }
}
